package com.glsc.ngateway.common.base.domain.mysql.opmanage.report.regulatory;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Objects;

/**
 * @author: qiyr
 * @date: 2022/6/28 14:48
 * @description: 场外债券现券持仓明细实体类
 */
@Data
@Entity
@Table(name = "t_reg_rpt_interotc_a9")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@IdClass(RegRptInterOtcA9.PK.class)
public class RegRptInterOtcA9 {

    @Id
    @Column(name = "main_id")
    private BigInteger mainId;

    @Column(name = "submit_org_name")
    private String submitOrgName;

    @Column(name = "submit_term")
    private String submitTerm;

    @Column(name = "submit_time")
    private String submitTime;

    @Id
    @Column(name = "row_id")
    private Integer rowId;

    /**
     * 业务类型
     */
    @Column(name = "ywlx")
    private String ywlx;

    /**
     * 序号
     */
    @Column(name = "xh")
    private Integer xh;

    /**
     * 交易场所
     */
    @Column(name = "jycs")
    private String jycs;

    /**
     * 债券编码
     */
    @Column(name = "zqbm")
    private String zqbm;

    /**
     * 期末持有券面金额
     */
    @Column(name = "qmcy_qmje")
    private Double qmcyQmje;

    /**
     * 期末持有公允价值
     */
    @Column(name = "qmcy_gyjz")
    private Double qmcyGyjz;

    /**
     * 信用等级分类
     */
    @Column(name = "xydjfl")
    private String xydjfl;

    /**
     * 成本金额
     */
    @Column(name = "cbje")
    private Double cbje;

    /**
     * 是否处于违约状态
     */
    @Column(name = "wyzt")
    private String wyzt;

    public RegRptInterOtcA9() {
    }

    public RegRptInterOtcA9(BigInteger mainId, String submitOrgName, String submitTerm, String submitTime,
                            Integer rowId, String ywlx, Integer xh, String jycs, String zqbm, Double qmcyQmje,
                            Double qmcyGyjz, String xydjfl, Double cbje, String wyzt) {
        this.mainId = mainId;
        this.submitOrgName = submitOrgName;
        this.submitTerm = submitTerm;
        this.submitTime = submitTime;
        this.rowId = rowId;
        this.ywlx = ywlx;
        this.xh = xh;
        this.jycs = jycs;
        this.zqbm = zqbm;
        this.qmcyQmje = qmcyQmje;
        this.qmcyGyjz = qmcyGyjz;
        this.xydjfl = xydjfl;
        this.cbje = cbje;
        this.wyzt = wyzt;
    }

    public static class PK implements Serializable {
        private BigInteger mainId;
        private Integer rowId;

        public BigInteger getMainId() {
            return mainId;
        }

        public void setMainId(BigInteger mainId) {
            this.mainId = mainId;
        }

        public Integer getRowId() {
            return rowId;
        }

        public void setRowId(Integer rowId) {
            this.rowId = rowId;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            PK pk = (PK) o;
            return Objects.equals(mainId, pk.mainId) && Objects.equals(rowId, pk.rowId);
        }

        @Override
        public int hashCode() {
            return Objects.hash(mainId, rowId);
        }
    }

    public BigInteger getMainId() {
        return mainId;
    }

    public void setMainId(BigInteger mainId) {
        this.mainId = mainId;
    }

    public String getSubmitOrgName() {
        return submitOrgName;
    }

    public void setSubmitOrgName(String submitOrgName) {
        this.submitOrgName = submitOrgName;
    }

    public String getSubmitTerm() {
        return submitTerm;
    }

    public void setSubmitTerm(String submitTerm) {
        this.submitTerm = submitTerm;
    }

    public String getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(String submitTime) {
        this.submitTime = submitTime;
    }

    public Integer getRowId() {
        return rowId;
    }

    public void setRowId(Integer rowId) {
        this.rowId = rowId;
    }

    public String getYwlx() {
        return ywlx;
    }

    public void setYwlx(String ywlx) {
        this.ywlx = ywlx;
    }

    public Integer getXh() {
        return xh;
    }

    public void setXh(Integer xh) {
        this.xh = xh;
    }

    public String getJycs() {
        return jycs;
    }

    public void setJycs(String jycs) {
        this.jycs = jycs;
    }

    public String getZqbm() {
        return zqbm;
    }

    public void setZqbm(String zqbm) {
        this.zqbm = zqbm;
    }

    public Double getQmcyQmje() {
        return qmcyQmje;
    }

    public void setQmcyQmje(Double qmcyQmje) {
        this.qmcyQmje = qmcyQmje;
    }

    public Double getQmcyGyjz() {
        return qmcyGyjz;
    }

    public void setQmcyGyjz(Double qmcyGyjz) {
        this.qmcyGyjz = qmcyGyjz;
    }

    public String getXydjfl() {
        return xydjfl;
    }

    public void setXydjfl(String xydjfl) {
        this.xydjfl = xydjfl;
    }

    public Double getCbje() {
        return cbje;
    }

    public void setCbje(Double cbje) {
        this.cbje = cbje;
    }

    public String getWyzt() {
        return wyzt;
    }

    public void setWyzt(String wyzt) {
        this.wyzt = wyzt;
    }
}
